package com.kim.rssreader.utils;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

import com.kim.rssreader.activity.RssContentViewActivity;
import com.kim.rssreader.activity.RssContentViewActivity2;

public class ActivityDispatch {

	/**
	 * 跳转到内容浏览界面
	 * 
	 * @param context
	 * @param link
	 * @param title
	 * @param time
	 * @param columnCategory
	 * @param columnFlagStarter
	 * @param columnFlagEnd
	 * @param columnId
	 * @param content
	 */
	public static void toContentView(Context context, String link,
			String title,String time, String columnCategory, String columnFlagStarter,
			String columnFlagEnd, String columnId, String content) {

		Intent intent = new Intent();
		intent.putExtra("url", Uri.parse(link).toString());
		intent.putExtra("title", title);
		intent.putExtra("time", time);
		intent.putExtra("category", columnCategory);
		intent.putExtra("flagStart", columnFlagStarter);
		intent.putExtra("flagEnd", columnFlagEnd);
		intent.putExtra("columnId", columnId);
		if (content != null && !"".equals(content)) {
			intent.putExtra("content", content);
		}
		intent.setClass(context, RssContentViewActivity2.class);
		context.startActivity(intent);
	}
}
